Theoretically then, a performance increase could be gained by unrolling
loops of fixed length? For example, if this piece of code...
#declare loop=0;
#while (loop<10)
#declare my_array [loop] = loop;
#declare loop=loop+1;
#end
...appeared in the middle of a macro called hundreds and hundreds of
times, would the scene parse faster if the following were substituted?
#declare my_array [0] = 0;
#declare my_array [1] = 1;
#declare my_array [2] = 2;
#declare my_array [3] = 3;
#declare my_array [4] = 4;
#declare my_array [5] = 5;
#declare my_array [6] = 6;
#declare my_array [7] = 7;
#declare my_array [8] = 8;
#declare my_array [9] = 9;
Presumably it would as there would be fewer I/O calls to seek back to
the beginning of the loop each time. Or am I simply wrong :-) ?
Post a reply to this message
|